package cn.itsource.controller;

import cn.itsource.dto.OrderDto;
import cn.itsource.service.IOrderAdoptService;
import cn.itsource.util.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author : 张金铭
 * @description :
 * @create :2022-11-26 09:57:00
 */
@Slf4j
@RestController
@RequestMapping("/adoptOrder")
public class OrderAdoptController {
    @Resource
    private IOrderAdoptService orderAdoptService;


    @PostMapping("/submitOrder")
    public JsonResult submitOrder(@RequestBody OrderDto orderDto)  {
       return JsonResult.success(orderAdoptService.submitOrder(orderDto));
    }
}
